Skip to content

feat(PVO11Y-4761): Add Kanary signal exporter #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

FaisalAl-Rayes
Copy link
Collaborator

@FaisalAl-Rayes FaisalAl-Rayes commented May 21, 2025

This commit introduces a new exporter to fetch Kanary signal values from a database and expose them as Prometheus metrics.

Includes:

  • Core exporter logic for PostgreSQL.
  • kanary_up metric with instance labels.
  • kanary_error metric with instance and reason labels
  • Unit tests using sqlmock.
  • README.md

@FaisalAl-Rayes FaisalAl-Rayes requested a review from kubasikus May 21, 2025 12:32
@FaisalAl-Rayes FaisalAl-Rayes force-pushed the kanary-signal-exporter branch from d3779d6 to 6a403f0 Compare May 22, 2025 07:38
@FaisalAl-Rayes
Copy link
Collaborator Author

Depends on #576

@FaisalAl-Rayes
Copy link
Collaborator Author

/retest

@FaisalAl-Rayes FaisalAl-Rayes marked this pull request as ready for review May 26, 2025 11:59
@FaisalAl-Rayes FaisalAl-Rayes requested review from raks-tt, martysp21 and pacho-rh and removed request for raks-tt, martysp21 and pacho-rh May 27, 2025 08:16
@FaisalAl-Rayes FaisalAl-Rayes force-pushed the kanary-signal-exporter branch 2 times, most recently from e697cd6 to 23ba13a Compare May 27, 2025 11:53
@FaisalAl-Rayes FaisalAl-Rayes requested review from martysp21 and removed request for kubasikus, pacho-rh, raks-tt and martysp21 May 27, 2025 11:59
@FaisalAl-Rayes FaisalAl-Rayes marked this pull request as draft May 27, 2025 12:40
@FaisalAl-Rayes FaisalAl-Rayes force-pushed the kanary-signal-exporter branch 2 times, most recently from d9cfc2f to 857f5c0 Compare May 28, 2025 07:56
@FaisalAl-Rayes FaisalAl-Rayes force-pushed the kanary-signal-exporter branch from 857f5c0 to 042b9e2 Compare May 28, 2025 08:01
@FaisalAl-Rayes FaisalAl-Rayes requested a review from flacatus May 29, 2025 07:50
@FaisalAl-Rayes FaisalAl-Rayes force-pushed the kanary-signal-exporter branch 2 times, most recently from 5af0285 to bd505e9 Compare May 29, 2025 13:59
@pacho-rh
Copy link
Collaborator

/retest

@FaisalAl-Rayes FaisalAl-Rayes force-pushed the kanary-signal-exporter branch 3 times, most recently from 4ba0f47 to 50efa28 Compare May 30, 2025 13:58
@kubasikus
Copy link
Collaborator

@FaisalAl-Rayes I pushed a commit with various changes I made during review. I've set up a mtg tmrow for us to sync and discuss it :)

@FaisalAl-Rayes FaisalAl-Rayes force-pushed the kanary-signal-exporter branch from 92f0ac2 to 252cfaf Compare June 2, 2025 11:23
@FaisalAl-Rayes FaisalAl-Rayes marked this pull request as ready for review June 2, 2025 11:24
@FaisalAl-Rayes FaisalAl-Rayes force-pushed the kanary-signal-exporter branch 2 times, most recently from bc02688 to 99a9c2e Compare June 2, 2025 11:25
Copy link
Collaborator

@kubasikus kubasikus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Copy link
Collaborator

@mftb mftb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

This commit introduces a new exporter to fetch Kanary signal values
from a database and expose them as Prometheus metrics.

Includes:
- Core exporter logic for PostgreSQL
- `kanary_up` metric with `instance`
- `kanary_error` metric with `instance` and `reason` labels
- Use a NewRegistry to control exposed Prometheus metrics. This ensures only explicitly registered application metrics are exported.
- README.md

Signed-off-by: Faisal Al-Rayes <[email protected]>

# Conflicts:
#	go.mod
@FaisalAl-Rayes FaisalAl-Rayes force-pushed the kanary-signal-exporter branch from 99a9c2e to 613d1ee Compare June 2, 2025 15:14
@FaisalAl-Rayes FaisalAl-Rayes merged commit 6f22e8a into redhat-appstudio:main Jun 2, 2025
2 checks passed
@FaisalAl-Rayes FaisalAl-Rayes deleted the kanary-signal-exporter branch June 2, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants